<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:da="livcos.org/ns/cosmos/data-access"
  xmlns="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="c da">

  <xsl:import href="../../style/base.xsl" />
  <xsl:import href="../../style/web.xsl" />
  
  <xsl:template match="/">
    <html id="{$callerObjId}">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Generate Encryption Key Wizard</title>
        <link href="../../css/global.css" rel="stylesheet" type="text/css" />
      	<script type="text/javascript" src="../../script/util.js"><!-- --></script>
      	<script type="text/javascript" src="../../script/E.js"><!-- --></script>
				<script type="text/javascript">
      		<xsl:comment>
      			
      		function cn(input) {
      			if (!input.value.match("^[A-Za-z][A-Za-z0-9\._-]*$")) {
	      			input.style.color = "red";
	      			input.parentNode.previousSibling.style.color = "red";
      			}
      			else {
      				input.style.color = "black";
      				input.parentNode.previousSibling.style.color = "black";
      				}
      		}
      		
      		</xsl:comment>
				</script>
      	<style>
      		p {
      		font-size: 80%;
      		margin: 6px 20px 10px;
      		}
      		td {
      		border-top: solid 1px gray;
      		height: 5em;
      		padding: 6px;
      		}
      		table {
      		margin: 10px 2px 0px;
      		}
      		.description {
      		font-size: 60%;
      		}
      	</style>
      </head>
      <body>
      	<h2>Generate Encryption Key Wizard</h2>
      	<p>
      		This wizard helps you to generate a new encryption key.
      	</p>
      	<form action="generateKey.view" method="GET">
        	<table cellspacing="0">
            <tbody>
            	<tr>
            		<td>Key ID:</td>
								<td>
									<input name="keyId" type="text" value="--URI--"
										onkeyup="cn(this)" onchange="cn(this)"/>
								</td>
            		<td class="description">
              		The URI of a new encryption key.
              		Examples are "/livcos.org/logins", "/my-domain/private",...
              	</td>
              </tr>
              <tr>
              	<td>&#160;</td>
                <td><input value="Generate" type="submit"/></td>
              	<td>&#160;</td>
              </tr>
            </tbody>
          </table>
        </form>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>
